package cn.it.dao;

import cn.it.pojo.Setmeal;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface SetmealDao {

    void add(Setmeal setmeal);

    void setSetmealAndCheckGroup(Map map);

    Page<Setmeal> findByCondition(String queryString);

    List<Setmeal> findAll();



 /*   @Select(" select * from t_setmeal where id = #{id} ")
    @Results({
            @Result(id = true,column = "id",property = "id"),
            @Result(
                    property = "checkGroups",
                    column = "id",
                    many=@Many(select = "cn.it.dao.CheckGroupDao.findCheckGroupBySetmealId")
                     )
    })*/
    Setmeal findById(int id);


    List<Map<String, Object>> findSetmealCount();
}
